Is it possible to apply filter on object history. |
Re: Filter On Object History Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Filter On Object History The History tab on the File > Module Properties dialogue box or the Edit > Object > properties dialogue box will let you filter all history records between two dates - you can also export history data which is tab separated and can be viewed within MSExcel where you can apply more advanced filtering if required. Some history records when viewed from the File > Module Properties dialogue box can be read-locked if the object they are referring to has also been deleted - so if you need to be able to read every history record of every object you will need to login as the Administrator user. Also - every version of a DOORS module only captures the history of that version and not the entire history across all preceding versions. Paul Miller Melbourne, Australia |
Re: Filter On Object History Mathias Mamsch - Thu Mar 03 05:04:10 EST 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS Thanks, Hardik Shah |
Re: Filter On Object History SystemAdmin - Thu Mar 03 23:32:40 EST 2011 There might be an easier solution if you can explain why you want to do this. Are you familiar with DOORS module and object level history records? Paul Miller Melbourne, Australia |
Re: Filter On Object History SystemAdmin - Thu Mar 03 23:32:40 EST 2011
No. Cannot also remember the "history" variable.
//*********************
bool fHistReadLocked(History hst)
{ // Is the History Read Locked to the current User?
if (null hst) return(true)
int Session = hst.sessionNo // Returns -1 if Read Locked
return(Session < 0) // Read Locked if Session number is not valid positive integer
} // end fHistReadLocked()
//***************************
bool fHistIsAttrDefn(History hst)
{ // Does the history record have an Attribute Definition Name associated with it?
HistoryType ht = hst.type
return( ht == createAttr or
ht == modifyAttr or
ht == deleteAttr or
ht == modifyObject
)
} // end fHistIsAttrDefn()
//***************************
bool fHistIsAttrType(History hst)
{ // Does the history record have an Attribute Type Name associated with it?
HistoryType ht = hst.type
return( ht == createType or
ht == modifyType or
ht == deleteType
)
} // end fHistIsAttrType()
//***************************
string fHistGetAttrName(History hst)
{ // Get the Attribute Name (or type), if any, associated with the History
string NameAttr
noError()
if(null hst)
NameAttr = ""
elseif(fHistIsAttrDefn(hst))
NameAttr = hst.attrName
elseif(fHistIsAttrType(hst))
NameAttr = hst.typeName
else NameAttr = ""
if (null NameAttr) NameAttr = "" // Fixes weird bug
if (!null lastError())
{ NameAttr = ""
}
return(NameAttr)
} // end fHistGetAttrName()
//***********************
History fHistGetNewestHist(Object obj, string NameAttr)
{ // Get the History of the latest modified date for the object's attribute.
// Only attributes that log history will be found.
// Returns null if no such History is found since the last module baseline.
// (Ignores previous baselines)
History hst, hstFound, hstNull = null
HistoryType ht
Object oInSkip
string HistDate, NameAttrHist
int CountHist, CountFound
if (null obj or null NameAttr) return(hstNull)
// print "fHistGetNewestHist start, Obj-NameAttr = " (identifier(obj)) "\t'" NameAttr "'\n"
CountHist = -1
CountFound = -1
for hst in obj do
{ CountHist++
if (fHistReadLocked(hst)) continue // Read Locked, unreadable
ht = hst.type
if (ht != modifyObject) continue // Not modify History
if (fHistGetAttrName(hst) != NameAttr) continue // Modifies some other attribute
// ** History modifies this Object Attribute
CountFound = CountHist // Found, but keep looking for more recent modification
} // end for all this object's History
if (CountFound < 0) return(hstNull)
// Now we know the History Counter of the History we want.
// Go back through and find that History
CountHist = -1
for hst in obj do
{ CountHist++
if (CountHist == CountFound)
return(hst)
}
print ">>fHistGetNewestHist program error; CountFound not actually found\n"
return(hstNull)
} // end fHistGetNewestHist()
|